//
//  CustomButton.m
//  TopicDemo
//
//  Created by InitialC on 16/12/1.
//  Copyright © 2016年 InitialC. All rights reserved.
//

#import "CustomButton.h"
#import "ZWToolHeader.h"

@implementation CustomButton

- (void)layoutSubviews {
    [super layoutSubviews];
    // 根据文字内容自动计算label尺寸
    [self.titleLabel sizeToFit];
    self.titleLabel.zw_x = self.zw_width - self.imageView.zw_width - self.titleLabel.zw_width;

    self.imageView.zw_x = self.zw_width - self.imageView.zw_width;
}

@end
